package scrumtaculous.service;

import java.util.List;

import scrumtaculous.domain.Task;
import scrumtaculous.domain.TaskDao;

public class TaskManagerImpl implements TaskManager
{

   private TaskDao taskDao = null;

   public void setTaskDao(TaskDao taskDaoIn)
   {
      this.taskDao = taskDaoIn;
   }

   @SuppressWarnings("unchecked")
   public List<Task> find()
   {
      return taskDao.find();
   }

   @SuppressWarnings("unchecked")
   public List<Task> find(Task task)
   {
      return taskDao.find(task);
   }

   public Task find(Integer id)
   {
      return (Task) taskDao.findById(id);
   }

   public Task save(Task task)
   {
      return taskDao.save(task);
   }
}
